姓名:王闯 学号:4201381

In [1]:
f = open('作业二素材.txt',encoding='utf-8')
txt = f.read()
f.close()
txt

index = txt.find('\n顺丰控股股份有限公司')
txt_target = txt[:index]
txt_target

e = txt_target.rfind('。')
s = txt_target[:e].rfind('。')
last_jz = txt_target[s+1:e+1]
last_jz

last_jz = last_jz.replace('\n','')
last_jz

print(len(last_jz))
38